package cn.yto.wdgj.wdgjgptdigitaltool.feign.request;


import lombok.Data;

/**
 * @author 谢文东
 * @description: 消息事件
 * @reason: 用户说的内容
 * @date 2023-11-6 10:21:01
 * @since JDK 1.8
 */
@Data
public class UserEvent extends Event {
    private MessageProp messageProp = new MessageProp(); // 默认实例化
    private Metadata metadata = new Metadata(); // 默认实例化
    private String sender = "default_sender"; // 默认值
    private String message = "default_message"; // 默认值

    @Data
    public static class MessageProp {
        private String format = "text"; // 默认值

    }

    @Data
    public static class Metadata {
        private String botId = "10"; // 默认值
        private String channel = "wdgj"; // 默认值
        private String channelPc = "pc"; // 默认值
        private String token = "default_token"; // 默认值
        private String userCode = "00003518"; // 默认值
        private UserInfo userInfo = new UserInfo(); // 默认实例化
        private Feedback feedback = new Feedback(); // 默认实例化
        private Setting setting = new Setting(); // 默认实例化
        private String wdgjToken = "default_wdgj_token"; // 默认值

        @Data
        public static class UserInfo {
            private String userName = "黄媛"; // 默认值
            private String employeeId = "00003518"; // 默认值
            private String userOrgType = "BRANCH"; // 默认值
            private String userOrgCode = "210045"; // 默认值
            private String userOrgName = "上海市静安区静安门"; // 默认值
            private int userId = 3518; // 默认值
            private String regionManageList = null;
            private String source = "sys_wdgj";
            private String employeeMobile = null;
            private String realUserOrgCode = "210045";
            private String realUserOrgName = "上海市静安区静安门";
            private String realUserOrgType = "BRANCH";
            private String userOrgProvName = null;
            private Long expireTime = 0L;
            private String yuandingGroupAuth = null;
            private boolean customRoleFlag = false;
        }

        @Data
        public static class Feedback {
            private String good = "赞666"; // 默认值
            private String bad = "我会继续努力学习"; // 默认值
            private String[] advises = {"回答错误",
                    "答案不正确",
                    "看不懂",
                    "看了不知道怎么操作",
                    "答案文字太多了",
                    "其他"}; // 默认值
            private int status = 1; // 默认值
        }

        @Data
        public class Setting {
            private String headImg = "https://yto-gpt.oss-cn-shanghai.aliyuncs.com/1697608724652.png";
            private String greeting = "您好，我是YTO-GPT，您的智能助理，能够解答问题、查询政策、分析问题，帮您获取企业相关知识。";
            private boolean isEnableHotTopic = true;
            private Association association = new Association();
            private Relate relate = new Relate();
            private Unknown unknown = new Unknown();
            private Sensitive sensitive = new Sensitive();
            private Silent silent = new Silent();
            private Recommend recommend = new Recommend();
            private boolean isEnableTTS = true;
            private boolean enableTtsStatus = false;
        }

        // 内部类：Association
        @Data
        public static class Association {
            private int status = 1;
            private int num = 5;
        }

        // 内部类：Relate
        @Data
        public static class Relate {
            private int status = 1;
            private int num = 5;
        }

        // 内部类：Unknown
        @Data
        public static class Unknown {
            private String response = "我还没有学会这个问题，已经记录会尽快学习为您解答，请尝试询问我其他问题。";
        }

        // 内部类：Sensitive
        @Data
        public static class Sensitive {
            private String response = "问题敏感";
        }

        // 内部类：Silent
        @Data
        public static class Silent {
            private int num = 300;
            private String response = "已经很久没有收到您的消息了，系统将结束本次对话，再次咨询请重新发起，谢谢!";
        }

        // 内部类：Recommend
        @Data
        public static class Recommend {
            private int status = 1;
            private int num = 5;
            private Threshold threshold = new Threshold();
            private String response = "您是想了解以下问题吗?";
        }

        // 内部类：Threshold
        @Data
        public static class Threshold {
            private double min = 0.6;
            private double max = 0.8;
        }
    }


}
